package android.makerapp.cortescabelo;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

/**
 * Created by Pablo on 14/12/2014.
 */
public class BaseBarActivity extends ActionBarActivity {

    public  static  class  AdFragment  extends Fragment {
        @Override
        public View onCreateView ( LayoutInflater inflater ,  ViewGroup container ,
                                   Bundle savedInstanceState )  {
            return inflater.inflate(R.layout.fragment_ad, container, false);
        }

        @Override
        public  void onActivityCreated ( Bundle bundle )  {
            super . onActivityCreated ( bundle );
            AdView mAdView =  ( AdView ) getView ().findViewById(R.id.adView);
            AdRequest adRequest =  new  AdRequest.Builder().build();
            mAdView . loadAd ( adRequest );
        }
    }
}
